package com.qhg.saas_server.controller;


import com.qhg.saas_server.empty.Result;

import com.qhg.saas_server.pojo.ListProduct;
import com.qhg.saas_server.service.ListAffirmLskService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@CrossOrigin
@RestController
@RequestMapping("/ListAffirmLskURL")
public class ListAffirmLskController {

    @Autowired
    private ListAffirmLskService listAffirmLskService;

    //库单表的审批,添加货物进仓库
    @GetMapping("/addProductInStore/{id}")
    public Result deleteAutority(@PathVariable(value = "id") Integer  listId){
        Map map = new HashMap();
        map.put("listProductId",listId);
        List<ListProduct> list = listAffirmLskService.selectList(map);
        listAffirmLskService.insertOrUpdateBatch(list);
        return Result.success(null);
    }

}
